package com.huawei.appmarket.service.externalapi.jumpers;

import android.net.Uri;
import android.text.TextUtils;
import com.huawei.appgallery.search.api.ISearchActivityProtocol;
import o.ceb;
import o.cej;
import o.dyr;
import o.dys.a;
import o.dyw;
import o.fho;
import o.fjb;

public class SearchActionJumper extends dyw {
    public SearchActionJumper(dyr o_dyr, a aVar, Uri uri) {
        super(o_dyr, aVar, uri);
    }

    public void ॱ() {
        for (String trim : cej.ˎ(this.ˊ.getEncodedQuery())) {
            String trim2 = trim2.trim();
            String ˏ = ceb.ˏ(this.ˊ, trim2);
            if ("q".endsWith(trim2)) {
                Object ˏ2 = ˏ(ˏ);
                fjb ˎ = fho.ˏ().ˋ("Search").ˎ("Search");
                ISearchActivityProtocol iSearchActivityProtocol = (ISearchActivityProtocol) ˎ.ˊ();
                if (!TextUtils.isEmpty(ˏ2)) {
                    iSearchActivityProtocol.setIntentKeyword(ˏ2);
                    iSearchActivityProtocol.setNeedSearch(true);
                    iSearchActivityProtocol.setShowDefaultHint(true);
                }
                this.ˏ.ˏ(ˎ, null);
                this.ˏ.finish();
            }
        }
        this.ˏ.finish();
    }

    private String ˏ(String str) {
        if (TextUtils.isEmpty(str)) {
            return "";
        }
        int indexOf = str.indexOf(":");
        if (-1 != indexOf) {
            return str.substring(indexOf + 1);
        }
        return str;
    }
}
